package com.car.main;

import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import com.kb.crawl.KBCrawlOfPCAuto;
import com.kb.dao.KBDaoOfPCAuto;

public class KBMainOfPCAuto {
	public static void main(String[] args) {
		KBDaoOfPCAuto kbDaoOfPCAuto = new KBDaoOfPCAuto();
		List<Integer> kbids = kbDaoOfPCAuto.getKBID();
		System.out.println(kbids.size());
		ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20);
		for (Integer kbid : kbids) {
			fixedThreadPool.execute(new KBCrawlOfPCAuto(kbid, kbDaoOfPCAuto));
		}
		fixedThreadPool.shutdown();
	}
}
